//
//  ReceiveMsgModel.swift
//  EyeVisionForPatients
//
//  Created by PMC on 2020/2/21.
//  Copyright © 2020 tao Tao. All rights reserved.
//

import UIKit
import HandyJSON

enum WebSocketCode: Int {
    case logout = 10024
    case login  = 10007
}

struct ReceiveModel: HandyJSON {
    struct MsgModel: HandyJSON {
        var chatType: Int = -1
        var cmd: Int = -1
        var content: String?
        var createTime: TimeInterval = 0
        var diagnoseId: Int = -1
        var docId: Int = -1
        var docName: String?
        var from: Int = -1
        // 6.处方消息
        var msgType: Int = 0
        var roleType: Int = 0
        var testType: Int = 0
        var to: Int = -1
        var id: String?
        
        var picType: String?
        var src: String?
        var time: Int = 0
        
        /// 处方
        var prescription: PrescriptionDetailModel?
        
        var preId: String = ""
    }
    
    var code: Int = -1
    var command: Int = -1
    var createTime: TimeInterval = 0
    var msg: String?
    var msgId: String?
    var data: MsgModel?
    var content: String = ""
    
    var cmd: Int = -1
    
    var id: String = ""
    var diagnoseId: String = ""
    var preId: String = ""
    var from: String = ""
    var to: String = ""
    var chatType: Int = -1
    var clientId: String?
    
    var docMobile: String = ""
    var token: String = ""
    var conferenceID: String = ""
    var conferenceNum: String = ""
    var patientAccount: String = ""
    var meetingType: String = ""
    var doctorUserId: String = ""
    
    var docName: String = ""
    var jobTitleName: String = ""
    var thumbnailUrl: String = ""
    
    var nameAndOffice: String { return docName + " " + jobTitleName }
    
    var passwdParticipant = ""
}
